Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Widget.Stack (Widget.StackPage, Widget.StackSwitcher) #107

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

linkfrg
Copy link
Owner

@linkfrg linkfrg commented Jan 7, 2025

Example usage:

from ignis.widgets import Widget

stack = Widget.Stack(
    child=[
        Widget.StackPage(
            title="page 1", child=Widget.Label(label="welcome to page 1!")
        ),
        Widget.StackPage(
            title="page 2", child=Widget.Label(label="welcome to page 2!")
        ),
        Widget.StackPage(
            title="page 3", child=Widget.Label(label="welcome to page 3!")
        ),
    ]
)

Widget.Box(
    vertical=True,
    # you should add both StackSwitcher and Stack.
    child=[Widget.StackSwitcher(stack=stack), stack],
)

Closes: #71

@linkfrg linkfrg added the enhancement New feature or request label Jan 7, 2025
@linkfrg linkfrg mentioned this pull request Jan 7, 2025
@linkfrg linkfrg merged commit 92a861c into main Jan 10, 2025
5 checks passed
@linkfrg linkfrg deleted the feat/stack branch January 10, 2025 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Gtk.Stack by default
1 participant